package com.example.tictactoe;


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;






public class New_Room extends Activity implements OnClickListener
{
	
	
	private String roomname;	
	
	public void onCreate(Bundle savedInstanceState) {
	      super.onCreate(savedInstanceState);
	      setContentView(R.layout.new_game_room);
	      Button submit=(Button)this.findViewById(R.id.submitgr);
	      submit.setOnClickListener( (OnClickListener) this);
	      
	    		  	      
	      
	      EditText editText = (EditText)findViewById(R.id.gameroomname);
	       roomname=editText.getText().toString();
	       
	       
	      
	}
	
	public void onClick(View v)
	{
		if (v.getId()==R.id.submitgr)
		{
			
			
			//enter the db code to insert new room into database
			
			Intent intent=new Intent(this, MainActivity.class);
			startActivity(intent); //code to start game
			
			
		}
		
		
		
	}
	
	 
	 
	}

	

	
	      
	
